<?php 
$this->pageTitle = Yum::t( "个人资料");
$this->breadcrumbs=array(Yum::t('Edit profile'));
$this->title = Yum::t('个人资料');
?>

<?php $this->beginContent('//layouts/profile_nav',array('active'=>'1')); ?>

<div class="form profile-form">

<?php echo CHtml::beginForm(); ?>

<?php echo Yum::requiredFieldNote(); ?>

<?php echo CHtml::errorSummary(array($user, $profile)); ?>

<?php 
if(isset($profile) && is_object($profile)) 
	$this->renderPartial('/profile/_form', array('profile' => $profile)); 
?>
	<div class="row buttons">
	<?php if(0):?>
	<?
	if(Yum::module('profile')->enablePrivacySetting)
		echo CHtml::button(Yum::t('Privacy settings'), array('submit' => array('/profile/privacy/update'))); ?>

	<?php 
		if(Yum::hasModule('avatar'))
			echo CHtml::button(Yum::t('Upload avatar Image'), array('submit' => array('/avatar/avatar/editAvatar'))); ?>
	<?php endif;?>

	<?php echo CHtml::submitButton($user->isNewRecord ? Yum::t('Create my profile') : Yum::t('Save profile changes'),array('class'=>'btn btn-primary')); ?>
	</div>
	<?php echo CHtml::endForm(); ?>

</div><!-- form -->

<?php $this->endContent(); ?>